package com.shop.product.client;

import com.shop.product.common.ProductInfoOutput;
import com.shop.product.common.ProductInfoVo;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(name = "product",fallback = ProductClientFallback.class)
public interface ProductClient {

    @PostMapping("/product/listForOrder")
    List<ProductInfoOutput> listForOrder(@RequestBody List<String> productIdList);

    /**
     * 扣库存
     */
    @PostMapping("/product/buckleStock")
    void buckleStock(@RequestBody List<ProductInfoVo> productInfoList);
}
